/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.example;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class HpbCampaignPeriodVoteResultExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    protected String orderByClause;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    protected boolean distinct;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public HpbCampaignPeriodVoteResultExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andNodeNameIsNull() {
            addCriterion("node_name is null");
            return (Criteria) this;
        }

        public Criteria andNodeNameIsNotNull() {
            addCriterion("node_name is not null");
            return (Criteria) this;
        }

        public Criteria andNodeNameEqualTo(String value) {
            addCriterion("node_name =", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameNotEqualTo(String value) {
            addCriterion("node_name <>", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameGreaterThan(String value) {
            addCriterion("node_name >", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameGreaterThanOrEqualTo(String value) {
            addCriterion("node_name >=", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameLessThan(String value) {
            addCriterion("node_name <", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameLessThanOrEqualTo(String value) {
            addCriterion("node_name <=", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameLike(String value) {
            addCriterion("node_name like", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameNotLike(String value) {
            addCriterion("node_name not like", value, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameIn(List<String> values) {
            addCriterion("node_name in", values, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameNotIn(List<String> values) {
            addCriterion("node_name not in", values, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameBetween(String value1, String value2) {
            addCriterion("node_name between", value1, value2, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeNameNotBetween(String value1, String value2) {
            addCriterion("node_name not between", value1, value2, "nodeName");
            return (Criteria) this;
        }

        public Criteria andNodeAddressIsNull() {
            addCriterion("node_address is null");
            return (Criteria) this;
        }

        public Criteria andNodeAddressIsNotNull() {
            addCriterion("node_address is not null");
            return (Criteria) this;
        }

        public Criteria andNodeAddressEqualTo(String value) {
            addCriterion("node_address =", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressNotEqualTo(String value) {
            addCriterion("node_address <>", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressGreaterThan(String value) {
            addCriterion("node_address >", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressGreaterThanOrEqualTo(String value) {
            addCriterion("node_address >=", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressLessThan(String value) {
            addCriterion("node_address <", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressLessThanOrEqualTo(String value) {
            addCriterion("node_address <=", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressLike(String value) {
            addCriterion("node_address like", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressNotLike(String value) {
            addCriterion("node_address not like", value, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressIn(List<String> values) {
            addCriterion("node_address in", values, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressNotIn(List<String> values) {
            addCriterion("node_address not in", values, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressBetween(String value1, String value2) {
            addCriterion("node_address between", value1, value2, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andNodeAddressNotBetween(String value1, String value2) {
            addCriterion("node_address not between", value1, value2, "nodeAddress");
            return (Criteria) this;
        }

        public Criteria andVoteRoundIsNull() {
            addCriterion("vote_round is null");
            return (Criteria) this;
        }

        public Criteria andVoteRoundIsNotNull() {
            addCriterion("vote_round is not null");
            return (Criteria) this;
        }

        public Criteria andVoteRoundEqualTo(Integer value) {
            addCriterion("vote_round =", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundNotEqualTo(Integer value) {
            addCriterion("vote_round <>", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundGreaterThan(Integer value) {
            addCriterion("vote_round >", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundGreaterThanOrEqualTo(Integer value) {
            addCriterion("vote_round >=", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundLessThan(Integer value) {
            addCriterion("vote_round <", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundLessThanOrEqualTo(Integer value) {
            addCriterion("vote_round <=", value, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundIn(List<Integer> values) {
            addCriterion("vote_round in", values, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundNotIn(List<Integer> values) {
            addCriterion("vote_round not in", values, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundBetween(Integer value1, Integer value2) {
            addCriterion("vote_round between", value1, value2, "voteRound");
            return (Criteria) this;
        }

        public Criteria andVoteRoundNotBetween(Integer value1, Integer value2) {
            addCriterion("vote_round not between", value1, value2, "voteRound");
            return (Criteria) this;
        }

        public Criteria andRankOrderIsNull() {
            addCriterion("rank_order is null");
            return (Criteria) this;
        }

        public Criteria andRankOrderIsNotNull() {
            addCriterion("rank_order is not null");
            return (Criteria) this;
        }

        public Criteria andRankOrderEqualTo(Integer value) {
            addCriterion("rank_order =", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderNotEqualTo(Integer value) {
            addCriterion("rank_order <>", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderGreaterThan(Integer value) {
            addCriterion("rank_order >", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderGreaterThanOrEqualTo(Integer value) {
            addCriterion("rank_order >=", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderLessThan(Integer value) {
            addCriterion("rank_order <", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderLessThanOrEqualTo(Integer value) {
            addCriterion("rank_order <=", value, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderIn(List<Integer> values) {
            addCriterion("rank_order in", values, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderNotIn(List<Integer> values) {
            addCriterion("rank_order not in", values, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderBetween(Integer value1, Integer value2) {
            addCriterion("rank_order between", value1, value2, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andRankOrderNotBetween(Integer value1, Integer value2) {
            addCriterion("rank_order not between", value1, value2, "rankOrder");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountIsNull() {
            addCriterion("vote_total_amount is null");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountIsNotNull() {
            addCriterion("vote_total_amount is not null");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountEqualTo(String value) {
            addCriterion("vote_total_amount =", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountNotEqualTo(String value) {
            addCriterion("vote_total_amount <>", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountGreaterThan(String value) {
            addCriterion("vote_total_amount >", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountGreaterThanOrEqualTo(String value) {
            addCriterion("vote_total_amount >=", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountLessThan(String value) {
            addCriterion("vote_total_amount <", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountLessThanOrEqualTo(String value) {
            addCriterion("vote_total_amount <=", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountLike(String value) {
            addCriterion("vote_total_amount like", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountNotLike(String value) {
            addCriterion("vote_total_amount not like", value, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountIn(List<String> values) {
            addCriterion("vote_total_amount in", values, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountNotIn(List<String> values) {
            addCriterion("vote_total_amount not in", values, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountBetween(String value1, String value2) {
            addCriterion("vote_total_amount between", value1, value2, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andVoteTotalAmountNotBetween(String value1, String value2) {
            addCriterion("vote_total_amount not between", value1, value2, "voteTotalAmount");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampIsNull() {
            addCriterion("create_timestamp is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampIsNotNull() {
            addCriterion("create_timestamp is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampEqualTo(Date value) {
            addCriterion("create_timestamp =", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampNotEqualTo(Date value) {
            addCriterion("create_timestamp <>", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampGreaterThan(Date value) {
            addCriterion("create_timestamp >", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampGreaterThanOrEqualTo(Date value) {
            addCriterion("create_timestamp >=", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampLessThan(Date value) {
            addCriterion("create_timestamp <", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampLessThanOrEqualTo(Date value) {
            addCriterion("create_timestamp <=", value, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampIn(List<Date> values) {
            addCriterion("create_timestamp in", values, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampNotIn(List<Date> values) {
            addCriterion("create_timestamp not in", values, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampBetween(Date value1, Date value2) {
            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
            return (Criteria) this;
        }

        public Criteria andCreateTimestampNotBetween(Date value1, Date value2) {
            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
            return (Criteria) this;
        }
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated do_not_delete_during_merge
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table hpb_campaign_period_vote_result
     *
     * @mbg.generated
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}